/***************************************************************************
 *   Copyleft 2008-2009 by												   *
 *	 Iwanicki Krzysztof													   *
 *   <gamma.mini.pw.edu.pl/~iwanickik>									   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 ***************************************************************************/
#ifdef V_WIN32_PLATFORM
#ifndef __VWIN32GLAPI_H__
#define __VWIN32GLAPI_H__


#include "./vGlApi.h"
#include "../../Macros/vMemoryMacros.h"

namespace Vendetta {
	/**
	* Win32 compatible, OpenGL based API class.
	* @see vGlApi
	*/
	class vWin32GlApi: public vGlApi {
		friend class vEngine3D;
	public:

		vVoid Update();

		//vVoid* newObject  (const vInt objectmName);

		/**
		* Returns current Device Context if any.
		* @return current Device Context
		*/
		HDC  GetDC() const;

		/**
		* Returns current OpenGL Rendering Context if any.
		* @return current OpenGL Rendering Context
		*/
		HGLRC GetGLRC() const;

		vVoid SwapColorBuffers();
	
	protected:
		/**
		* Default constructor.
		*/
		vWin32GlApi();

		/**
		* Default destructor.
		*/
		~vWin32GlApi();

		vBool init();
		
		vVoid kill();

		

	private:

		HDC  mDC;///< Device Context
		HGLRC mGLRC;  ///< OpenGL Rendering Context

	};
}

#endif // __VWIN32GLAPI_H__

#endif // V_WIN32_PLATFORM